﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;

namespace Cofe.Core.Actions
{
    public static class ITransferManagerExtension
    {        
        public static async Task<ICofeSystemInfo> TransferAsync(this ITransferManager manager, TransferMode mode, 
            ICofeSystemInfo entry, ICofeDirectoryInfo fromm,
                   ICofeDirectoryInfo too, IProgress<ProgressEventArgs> progress, System.Threading.CancellationToken cts)
        {
            return (await manager.TransferAsync(mode, new ICofeSystemInfo[] { entry }, fromm, too, progress, cts)).FirstOrDefault();
        }


    }
}
